package com.waitingresult.demo.annotation;

import com.waitingresult.demo.aspect.CheckEnumsByIntValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @Author: WangShuai
 * @CreateTime: 2023/5/18  12:53
 * @Description:
 * @Version: 1.0
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = { CheckEnumsByIntValidator.class})
public @interface CheckEnumsByInt {

    String message() default "参数错误";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
    /**
     * 类型参数对应枚举
     * @return
     */
    Class modelTypeEnums() default Object.class;



}
